#!/usr/bin/php -q
<?
	$test=$argv[1];

	$tests=array(
		"b001"=>array(
			"file"=>"basic/b001.php",
			"description"=>"SDL Basics"
		),
		"v001"=>array(
			"file"=>"video/v001.php",
			"description"=>"SDL Video Basics"
		),
		"e001"=>array(
			"file"=>"event/e001.php",
			"description"=>"SDL Event Basics"
		),
		"g001"=>array(
			"file"=>"gfx/g001.php",
			"description"=>"SDL GFX Basics"
		),
		"i001"=>array(
			"file"=>"image/i001.php",
			"description"=>"SDL Image Basics"
		),
		"t001"=>array(
			"file"=>"ttf/t001.php",
			"description"=>"SDL TTF Basics"
		),
		
		
	);

	if (!in_array($test,array_keys($tests)	)) {
		foreach ($tests as $kv=>$kk) {
			echo $kv.":".$kk["description"]."\n";
		}
		echo "\n";
		die("'$test' non definito, scegliere tra uno dei test elencati\n");
	}
	$className="test_".$test;
	echo $tests[$test]["description"]."\n";
	include_once($tests[$test]["file"]);
	$c=new $className();
	$c->manage($argv);
	
	
?>
